<div class="w-box">
	<div class="w-box-content cnt_a">
		<h1 class="page-header page-header-a"><?php echo $text_heading; ?></h1>
		<?php $this->load->view('helpers/widgets/research-filter-sort.php'); ?>
		<div class="tabbable tabbable-bordered">
			<ul class="tabs nav nav-tabs">
			<?php
			$count = 0;
			foreach ($categories as $key => $category) {
				$count++;
				?>
				<li <?php if($count == 1) {echo 'class="active"';} ?>><a
					href="#tab-<?php echo $count; ?>"><?php echo $category['name']; ?></a></li>
					<?php } ?>
			</ul>
			<div class="tab-content"><?php
				$count = 0;
				foreach ($categories as $key => $category) {
					$count++;
					?>
				<div class="tab-pane <?php if($count == 1) {echo 'active';}?>" id="tab-<?php echo $count; ?>">
					<div class="our-agents-large">
						<div class="content">
							<?php foreach ($category['children'] as $post) { ?>
							<div class="agent">
								<div class="row">
									<div class="image span2">
										<a href="<?php echo $post['href']; ?>"><img src="<?php echo $post['image'] ?>"alt="<?php echo $post['name']; ?>"></a>
									</div>
									<!-- /.image -->
								
									<div class="body span6">
										<h3><a href="<?php echo $post['href']; ?>"><?php echo $post['name']; ?></a></h3>
										<p><?php echo html_entity_decode(character_limiter(ucwords(strtolower($post['sumarry'])), 140) , ENT_QUOTES, 'UTF-8'); ?></p>
									</div>
									<!-- /.body -->
								</div>
								<!-- /.row -->
							</div>
							<!-- /.agent --> 
							<?php } ?>
						</div>
						<!-- /.content -->
					</div>
					<!-- /.our-agents -->
				</div>
					<?php } ?>
			</div>
		</div>
	</div>
</div>

